// This file contains material supporting the textbook:
// "Object Oriented Software Engineering" and is issued under the open-source
// license found at www.lloseng.com

package com.drawpad;

import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

class PadWindowAdapter extends WindowAdapter 
{
  DrawPad adaptee;

  PadWindowAdapter(DrawPad adaptee) 
  {
    this.adaptee = adaptee;
  }

    @Override
  public void windowClosing(WindowEvent e) 
  {
    adaptee.dispose();
  }
}
